/*
	The directives starting with # below ensures that this file is read by the compiler only once
	even if it is #included several times. It is call an "include guard"
*/
#ifndef CATEGORY_H_
#define CATEGORY_H_

#include <string>
#include <sstream>

using namespace std;

struct Category {
public:
	
	// constructors
	Category () {}
	Category(int x, string y):cat_id(x), cat_name(y) { }
    // utility functions
	string display() const
		{
			//cart item display format
			stringstream sline (stringstream::in | stringstream::out);
			sline << cat_id << "\t\t" << cat_name;
			return sline.str();
		}
	
	string write() const
		{
			//cart item display format
			stringstream sline (stringstream::in | stringstream::out);
			sline << cat_id << " " << cat_name << "\n";
			return sline.str();
		}

	//getter functions
	int getCatId() const{return cat_id;}
	string getCatName() const{return cat_name;}


private:
   //constants
     
   // private data
	int cat_id;
	string cat_name;
};


#endif //CATEGORY_H_
